#include "StdAfx.h"
#include "AnimationGoCart.h"
#include "math.h"
#define Pi  std::atan(1.0)*4
CAnimationGoCart::CAnimationGoCart(void)
{
	m_time=0;
	m_increment=0;
}

CAnimationGoCart::~CAnimationGoCart(void)
{
}

void CAnimationGoCart::Update(void)
{
	
	m_time++;
	m_time %= (72+48);

	if((m_time >= 0) && (m_time < 12))
	{
		m_increment = 0;
	}
	else if((m_time >= 12) && (m_time < 24))
	{
		m_increment += .25;
	}
	else if((m_time >= 132) && (m_time < 465))
	{
		m_increment = 200;
	}
	else if((m_time >= 24) && (m_time < 72))
	{
		m_increment -= .25;
	}
	else if((m_time >= 72) && (m_time < (72+48)))
	{
		m_increment += .25;
	}
		

	m_node->SetAngle(m_node->GetAngle() + m_increment);

}